package com.felton.springbootflyway.controller;

import com.felton.springbootflyway.service.IAuxiliaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author LiuRui
 * @version 1.0
 * @date 2019/12/10 17:12
 * @description 辅助类
 */
@Controller
@RequestMapping("/auxiliary")
public class AuxiliaryController {
    @Autowired
    private IAuxiliaryService auxiliaryService;

    @ResponseBody
    @RequestMapping(value = "/test", method = RequestMethod.GET)
    public String checkUpdate() {
        if (auxiliaryService.checkUpdateStatus()) {
            return "false";
        }
        return "success";
    }
}
